/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2012-2020. All rights reserved.
 */

package com.huawei.aiservice.exception;

/**
 * BusinessException
 *
 * @author chenpingui
 * @since 2012-12-22（或版本号）
 */
public class BusinessException extends RuntimeException {
    Integer code = 500;

    /**
     * BusinessException
     *
     * @param code    code
     * @param message message
     * @param ex       ex
     * @return MultiResponse MultiResponse
     **/
    public BusinessException(Integer code, String message, Exception ex) {
        super(message, ex);
        this.code = code;
    }

    /**
     * BusinessException
     *
     * @param code    code
     * @param message message
     **/
    public BusinessException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    /**
     * BusinessException
     *
     * @param message message
     * @param ex       ex
     **/
    public BusinessException(String message, Exception ex) {
        super(message, ex);
    }

    /**
     * BusinessException
     *
     * @param message message
     **/
    public BusinessException(String message) {
        super(message);
    }

    /**
     * getCode
     *
     * @return code
     */
    public Integer getCode() {
        return code;
    }

    /**
     * setCode
     *
     * @param code code
     */
    public void setCode(Integer code) {
        this.code = code;
    }
}
